<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=7">
    <title>密码重置_找回密码_{$site.site_title}</title>
    <meta name="keywords" content="{$site.site_keywords}">
    <meta name="description" content="{$site.site_desc}">
    <link href="__STATIC__/css/style.css" rel="stylesheet" type="text/css" />
    <script src="__STATIC__/js/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script src="__STATIC__/js/common.js" type="text/javascript"></script>

</head>
<body style="background:#f5f5f5; padding-top:100px;">
<div class="czmm">
    <!--<div class="czmm_logo"><img src="__STATIC__/images/logo1.png" alt="全球零号"></div>-->
    <!--<div class="czmm_c">重置密码</div>-->
    <form action="{:U('passport/reset')}" id="reset-form">
    <table border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td><input type="password" name="password" value="" id="password" class="clogin" placeholder="请输入新密码" style="padding-left:10px;"/></td>
        </tr>
        <tr>
            <td><input type="password" name="confirm_pass" value="" id="confirm_pass" class="clogin" placeholder="请再次确认新密码" style="padding-left:10px;"/></td>
        </tr>
        <tr>
            <td><input type="button" id="button" value="确 定" class="anniu3"/></td>
        </tr>
        <input type="hidden" name="secret" value="{$secret}"/>
    </table>
</form>
</div>
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script>
    $(function(){
        $('#button').click(function(){
            if(!verify('#password', '请输入新密码')) return false
            var password = $('#password').val()
            if(password.length < 6)
            {
                layer.tips('新密码至少6位', '#password', {tips:[2, '#3595CC']});
                $('#password').focus();
                return false;
            }
            if(!verify('#confirm_pass', '请输入确认新密码')) return false
            var confirm_pass = $('#confirm_pass').val()
            if( confirm_pass != password)
            {
                layer.tips('两次输入不一致', '#confirm_pass', {tips:[2, '#3595CC']});
                $('#confirm_pass').focus();
                return false;
            }
            $.ajax({
                data: $('#reset-form').serialize(),
                url : $('#reset-form').attr('action'),
                dataType :'json',
                type:'post',
                success: function(res){
                    if(res.status)
                    {
                        layer.msg(res.msg,{time:3000}, function(){
                            window.location.href="{:U('passport/login')}"
                        });
                        return false
                    } else {
                        layer.msg(res.msg)
                    }
                }
            })

        })
    })
</script>
</body>
</html>
</html>